import PageHeader from '@/components/PageHeader';
import FilterList from './components/FilterList';
import { Card, ResponsiveGrid } from '@alifd/next';
import { useParams, useLocation } from 'ice';

function ResourceManage() {
  const { parentId = -1 } = useParams<any>();
  const location = useLocation<any>();
  const { name = '资源管理' } = location?.state || {};


  return (
    <ResponsiveGrid gap={20}>
      <ResponsiveGrid.Cell colSpan={12}>
        <PageHeader title={name} breadcrumbs={[{ name: '基础管理' }, { name: '资源管理' }]} />
      </ResponsiveGrid.Cell>
      <ResponsiveGrid.Cell colSpan={12}>
        <Card free>
          <FilterList
            parentId={parentId}
          />
        </Card>
      </ResponsiveGrid.Cell>
    </ResponsiveGrid>
  );
}

export default ResourceManage;
